// $ANTLR 3.4 /home/javier/workspace_pl/practica7/src/main/java/PracticasPL/practica7/YACCParser.g 2012-11-05 12:38:05

  package PracticasPL.practica7;
  import java.util.ArrayList;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class YACCParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "BLANCO", "COMENTARIO", "DEFINE"
    };

    public static final int EOF=-1;
    public static final int BLANCO=4;
    public static final int COMENTARIO=5;
    public static final int DEFINE=6;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public YACCParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public YACCParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

    public String[] getTokenNames() { return YACCParser.tokenNames; }
    public String getGrammarFileName() { return "/home/javier/workspace_pl/practica7/src/main/java/PracticasPL/practica7/YACCParser.g"; }


          //Lista que guarda los errores que se van produciendo durante el analisis lexico
        List<RecognitionException> errors = new ArrayList<RecognitionException>();

        //Metodo que devuelve la lista de errores que se han producido
        public List<RecognitionException> getAllErrors() {
            return errors;
        }
        
        //Metodo que comprueba si se han producido errores
        public boolean hasErrors() {
            return !errors.isEmpty();
        }

        //Metodo del analizador lexico sobrescrito para que los errores que se van
        //produciendo durante el analisis lexico en vez de mostrarse por consola
        //se guarden en la lista de errores (errors)
        @Override
        public void reportError(RecognitionException e) {
            errors.add(e);
        }



    // $ANTLR start "define"
    // /home/javier/workspace_pl/practica7/src/main/java/PracticasPL/practica7/YACCParser.g:40:1: define : DEFINE EOF ;
    public final void define() throws RecognitionException {
        try {
            // /home/javier/workspace_pl/practica7/src/main/java/PracticasPL/practica7/YACCParser.g:40:8: ( DEFINE EOF )
            // /home/javier/workspace_pl/practica7/src/main/java/PracticasPL/practica7/YACCParser.g:40:10: DEFINE EOF
            {
            match(input,DEFINE,FOLLOW_DEFINE_in_define59); 

            match(input,EOF,FOLLOW_EOF_in_define61); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "define"

    // Delegated rules


 

    public static final BitSet FOLLOW_DEFINE_in_define59 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_define61 = new BitSet(new long[]{0x0000000000000002L});

}